<?php

// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\facade\Route;



Route::get('wechat/getUserId', 'applet/Wechat/getUserId');
Route::get('alipay/getUserId', 'applet/Alipay/getUserId');
Route::post('login/getSmsCode', 'applet/Login/getSmsCode');
Route::post('login/bindRoom', 'applet/Login/bindRoom');



Route::rule('parking/getParkingIdByAppId', 'applet/parking/getParkingIdByAppId');
Route::get('index/getData', 'applet/index/getData');


Route::group(function () {
    Route::get('car_monthly_rental/getList', 'applet/CarMonthlyRental/getList');
    Route::post('car_monthly_rental/add', 'applet/CarMonthlyRental/add');
    Route::get('car_monthly_rental/getReleaseList', 'applet/CarMonthlyRental/getReleaseList');
    Route::post('car_monthly_rental/addRelease', 'applet/CarMonthlyRental/addRelease');

    Route::post('car_monthly_rental/delete', 'applet/CarMonthlyRental/delete');

    Route::get('car/getListByPlateNum', 'applet/Car/getListByPlateNum');
    Route::post('car/add', 'applet/Car/add');

    Route::get('welfare/getList', 'applet/Welfare/getList');
    Route::post('welfare/add', 'applet/Welfare/add');
    Route::post('welfare/delete', 'applet/Welfare/delete');
    Route::any('welfare/billList', 'applet/Welfare/billList');


    Route::get('pklot/getList', 'applet/Pklot/getList');


    Route::get('bill/calculatingTempCost', 'applet/bill/calculatingTempCost');
    Route::get('bill/createOrder', 'applet/bill/createOrder');
    Route::any('trade/trade', 'applet/Trade/trade');
})->middleware([
        \app\applet\middleware\CheckLogin::class,
        \app\applet\middleware\CheckParkingNo::class
    ]
);
//Route::group('applet', function () {
//    Route::get('applet/index/getData', '\app\applet\index@getData');
//

//});